package com.dragee.modules.base.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dragee.config.resolver.LongJsonDeserializer;
import com.dragee.config.resolver.LongJsonSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 
 * 
 * @author tc
 * @email tc@mail.com
 * @date 2023-04-13 15:37:01
 */
@Data
@TableName("base_sms_code")
@NoArgsConstructor
public class SmsCodeEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    public SmsCodeEntity (String flag, String code, Long time) {
        this.flag = flag;
        this.code = code;
        this.invaidTime = time;
    }

    /**
     * id
     */
    @TableId
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long id;

    /**
     * 
     */
    private String flag;

    /**
     * 字典含义
     */
    private String code;

    /**
     * 失效时间
     */
    private Long invaidTime;

    }